package com.example.demo.common;

import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by Administrator on 2018/4/1.
 */
public class Constant {

    public static ConcurrentHashMap<String, Long> loginMap = new ConcurrentHashMap<>();

    public static ConcurrentHashMap<String, String> messageMap = new ConcurrentHashMap<>();

    public final static String API_VERSION = "/v0.1";

    public final static String ERROR_FORMAT = "{0},{1}";

    public final static Integer SCORE_GET = 1;

    public final static Integer SCORE_USE = 2;

    public final static Integer ACTIVITY_END = 1;

    public enum Role {
        USER("USER", 3), ADMIN("ADMIN", 1);

        private String roleName;

        private int roleCode;

        private Role(String roleName, int roleCode) {
            this.roleName = roleName;
            this.roleCode = roleCode;
        }

        public String getRoleName() {
            return roleName;
        }

        public void setRoleName(String roleName) {
            this.roleName = roleName;
        }

        public int getRoleCode() {
            return roleCode;
        }

        public void setRoleCode(int roleCode) {
            this.roleCode = roleCode;
        }
    }

}
